import { baiduOpenAbility } from "./baidu";
import { OpenAbility } from "./microapp";

class IndexOpenAbility implements OpenAbility {
  login(e: any): Promise<any> {
    console.log("登录");
    const platform = uni.getSystemInfoSync().platform;
    switch (platform) {
      case "mp-baidu":
        return baiduOpenAbility.login(e);
      default:
        return Promise.reject();
    }
  }
}
export const openAbility = new IndexOpenAbility();
export default openAbility;
